package com.vstartek.dm.cxf.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.vstartek.dm.cxf.DbCenterService;
import com.vstartek.dm.mongo.model.Detail;
import com.vstartek.dm.mongo.model.VideoData;
import com.vstartek.dm.mongo.model.VideoTag;
import com.vstartek.dm.mongo.model.VideoWeb;
import com.vstartek.dm.mongo.service.VideoDataService;
import com.vstartek.dm.mongo.service.VideoTagService;
import com.vstartek.dm.mongo.service.VideoWebService;
import com.vstartek.dm.util.Page;
import com.vstartek.dm.util.PageParam;

@Service
public class DbCenterServiceImpl implements  DbCenterService{
	
	
	@Autowired
	VideoWebService  videoWebService;
	
	@Autowired
	VideoDataService  videoDataService;
	
	@Autowired
	VideoTagService  videoTagService;

	@Override
	public VideoWeb findVideoWebById(Object id) {
		return videoWebService.findById(id);
	}

	@Override
	public Page<VideoData> findVideoDataByPage(PageParam pageParam, VideoData videoData) {
		return videoDataService.findByPage(pageParam, videoData);
	}

	@Override
	public Page<VideoTag> findVideoTagByPage(PageParam pageParam,VideoTag videoTag) {
		return videoTagService.findByPage(pageParam, videoTag);
	}

	@Override
	public Page<VideoWeb> findVideoWebByPage(PageParam pageParam,VideoWeb videoWeb) {
		return videoWebService.findByPage(pageParam, videoWeb);
	}

	@Override
	public Page<Detail> findDetailByPage(PageParam pageParam, VideoWeb videoWeb) {
		return videoWebService.findDetailByPage(pageParam, videoWeb);
	}

	@Override
	public VideoData saveVideoData(VideoData videoData) {
		return videoDataService.saveVideoData(videoData);
	}

	@Override
	public boolean updateVideoData(VideoData videoData) {
		return videoDataService.updateVideoData(videoData);
	}

	@Override
	public VideoTag saveVideoTag(VideoTag videoTag) {
		return videoTagService.saveVideoTag(videoTag);
	}

	@Override
	public boolean updateVideoTag(VideoTag videoTag) {
		return videoTagService.updateVideoTag(videoTag);
	}

	@Override
	public VideoWeb saveVideoWeb(VideoWeb videoWeb) {
		return videoWebService.saveVideoWeb(videoWeb);
	}

	@Override
	public boolean updateVideoWeb(VideoWeb videoWeb) {
		return videoWebService.updateVideoWeb(videoWeb);
	}

	@Override
	public VideoData findVideoDataById(Object id) {
		return videoDataService.findById(id);
	}

	@Override
	public VideoTag findVideoTagById(Object id) {
		return videoTagService.findById(id);
	}

	@Override
	public Detail findDetailById(Object id, Object xid) {
		return videoWebService.findDetailById(id, xid);
	}

	@Override
	public Detail saveDetail(Object id, Detail detail) {
		return videoWebService.saveDetail(id, detail);
	}

	@Override
	public boolean updateDetail(Object id, Detail detail) {
		return videoWebService.updateDetail(id, detail);
	}

	@Override
	public List<String> group() {
		return videoWebService.group();
	}

}
